<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>
<body>
  <script src="../dist/bundle.js"></script>
  <script>
    let o = {
      name: "jim",
      arr: [ 1, 2, 3, "4", '5' ],
      test1: 1,
      test2: true,
      test: {
        name: 'jim',
        age: 19,
        gender: true
      }
    };

    let res = toJSON( o );
    console.log( res )
  
  </script>
</body>
</html>